# !/bin/env python
# -*- coding:utf-8
"""
@author:xingz
@file:edge.py
@time:2021/11/21
"""
from __future__ import annotations
from dataclasses import dataclass


@dataclass
class Edge:
    u: int  # from
    v: int  # to

    def reversed(self):
        return Edge(self.v, self.u)

    def __str__(self):
        return f"{self.u}->{self.v}"


if __name__ == '__main__':
    e = Edge(1, 2)
    print(e)
